import 'package:flutter_ncsjqz_getx/generated/json/base/json_convert_content.dart';
import 'package:flutter_ncsjqz_getx/model/all_farm_video_entity.dart';

AllFarmVideoEntity $AllFarmVideoEntityFromJson(Map<String, dynamic> json) {
	final AllFarmVideoEntity allFarmVideoEntity = AllFarmVideoEntity();
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		allFarmVideoEntity.msg = msg;
	}
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		allFarmVideoEntity.code = code;
	}
	final AllFarmVideoData? data = jsonConvert.convert<AllFarmVideoData>(json['data']);
	if (data != null) {
		allFarmVideoEntity.data = data;
	}
	return allFarmVideoEntity;
}

Map<String, dynamic> $AllFarmVideoEntityToJson(AllFarmVideoEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['msg'] = entity.msg;
	data['code'] = entity.code;
	data['data'] = entity.data?.toJson();
	return data;
}

AllFarmVideoData $AllFarmVideoDataFromJson(Map<String, dynamic> json) {
	final AllFarmVideoData allFarmVideoData = AllFarmVideoData();
	final int? totalCount = jsonConvert.convert<int>(json['totalCount']);
	if (totalCount != null) {
		allFarmVideoData.totalCount = totalCount;
	}
	final int? pageSize = jsonConvert.convert<int>(json['pageSize']);
	if (pageSize != null) {
		allFarmVideoData.pageSize = pageSize;
	}
	final int? totalPage = jsonConvert.convert<int>(json['totalPage']);
	if (totalPage != null) {
		allFarmVideoData.totalPage = totalPage;
	}
	final int? currPage = jsonConvert.convert<int>(json['currPage']);
	if (currPage != null) {
		allFarmVideoData.currPage = currPage;
	}
	final List<AllFarmVideoDataList>? xList = jsonConvert.convertListNotNull<AllFarmVideoDataList>(json['list']);
	if (xList != null) {
		allFarmVideoData.xList = xList;
	}
	return allFarmVideoData;
}

Map<String, dynamic> $AllFarmVideoDataToJson(AllFarmVideoData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['totalCount'] = entity.totalCount;
	data['pageSize'] = entity.pageSize;
	data['totalPage'] = entity.totalPage;
	data['currPage'] = entity.currPage;
	data['list'] =  entity.xList?.map((v) => v.toJson()).toList();
	return data;
}

AllFarmVideoDataList $AllFarmVideoDataListFromJson(Map<String, dynamic> json) {
	final AllFarmVideoDataList allFarmVideoDataList = AllFarmVideoDataList();
	final int? surveillanceId = jsonConvert.convert<int>(json['surveillanceId']);
	if (surveillanceId != null) {
		allFarmVideoDataList.surveillanceId = surveillanceId;
	}
	final String? deviceName = jsonConvert.convert<String>(json['deviceName']);
	if (deviceName != null) {
		allFarmVideoDataList.deviceName = deviceName;
	}
	final dynamic? orderId = jsonConvert.convert<dynamic>(json['orderId']);
	if (orderId != null) {
		allFarmVideoDataList.orderId = orderId;
	}
	final dynamic? videoPic = jsonConvert.convert<dynamic>(json['videoPic']);
	if (videoPic != null) {
		allFarmVideoDataList.videoPic = videoPic;
	}
	final String? videoAddress = jsonConvert.convert<String>(json['videoAddress']);
	if (videoAddress != null) {
		allFarmVideoDataList.videoAddress = videoAddress;
	}
	final String? farmSize = jsonConvert.convert<String>(json['farmSize']);
	if (farmSize != null) {
		allFarmVideoDataList.farmSize = farmSize;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		allFarmVideoDataList.createTime = createTime;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		allFarmVideoDataList.updateTime = updateTime;
	}

	final dynamic? classifyName = jsonConvert.convert<dynamic>(json['classifyName']);
	if (classifyName != null) {
		allFarmVideoDataList.classifyName = classifyName;
	}

	final dynamic? classifyPic = jsonConvert.convert<dynamic>(json['classifyPic']);
	if (classifyPic != null) {
		allFarmVideoDataList.classifyPic = classifyPic;
	}

	final dynamic? classifyId = jsonConvert.convert<dynamic>(json['classifyId']);
	if (classifyId != null) {
		allFarmVideoDataList.classifyId = classifyId;
	}
	return allFarmVideoDataList;
}

Map<String, dynamic> $AllFarmVideoDataListToJson(AllFarmVideoDataList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['surveillanceId'] = entity.surveillanceId;
	data['deviceName'] = entity.deviceName;
	data['orderId'] = entity.orderId;
	data['videoPic'] = entity.videoPic;
	data['videoAddress'] = entity.videoAddress;
	data['farmSize'] = entity.farmSize;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['classifyId'] = entity.classifyId;
	data['classifyPic'] = entity.classifyPic;
	data['classifyName'] = entity.classifyName;
	return data;
}